﻿using Daemon.Model;
using Microsoft.AspNetCore.Mvc;
using Daemon.Repository.Contract;
using System.Net.Http;
using Microsoft.AspNetCore.Http;
using Daemon.Common;
using Daemon.Service.Contract;

namespace DaemonAPI
{
	[ApiController]
	[Route("api/[controller]/[action]")]
	public class CommonCityController : BaseApiController<CommonCity, ICommonCityRepository>
	{
		private readonly ICommonCityService _commonCityService;
		public CommonCityController(ICommonCityRepository repository, IHttpContextAccessor httpContextAccessor, ICommonCityService commonCityService) : base(repository, httpContextAccessor)
		{
			_commonCityService = commonCityService;
		}

		[HttpGet]
		[Route("")]
		public ResultModel GetCommonCity()
		{
			return new ResultModel(System.Net.HttpStatusCode.OK, "", _commonCityService.GetCommonCity());
		}
	}
}
